package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.FactoryManagement;
import com.ruoyi.recycle.mapper.FactoryManagementMapper;
import com.ruoyi.recycle.service.IFactoryManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工厂管理Service业务层处理
 *
 * @author Wubk
 * @date 2022-05-22
 */
@Service
public class FactoryManagementServiceImpl extends ServiceImpl<FactoryManagementMapper, FactoryManagement> implements IFactoryManagementService {
    @Autowired
    private FactoryManagementMapper factoryManagementMapper;

    /**
     * 查询工厂管理
     *
     * @param id 工厂管理主键
     * @return 工厂管理
     */
    @Override
    public FactoryManagement selectFactoryManagementById(Long id) {
        return factoryManagementMapper.selectFactoryManagementById(id);
    }

    /**
     * 查询工厂管理列表
     *
     * @param factoryManagement 工厂管理
     * @return 工厂管理
     */
    @Override
    public List<FactoryManagement> selectFactoryManagementList(FactoryManagement factoryManagement) {
        return factoryManagementMapper.selectFactoryManagementList(factoryManagement);
    }

    /**
     * 新增工厂管理
     *
     * @param factoryManagement 工厂管理
     * @return 结果
     */
    @Override
    public int insertFactoryManagement(FactoryManagement factoryManagement) {
        return factoryManagementMapper.insertFactoryManagement(factoryManagement);
    }

    /**
     * 修改工厂管理
     *
     * @param factoryManagement 工厂管理
     * @return 结果
     */
    @Override
    public int updateFactoryManagement(FactoryManagement factoryManagement) {
        return factoryManagementMapper.updateFactoryManagement(factoryManagement);
    }

    /**
     * 批量删除工厂管理
     *
     * @param ids 需要删除的工厂管理主键
     * @return 结果
     */
    @Override
    public int deleteFactoryManagementByIds(Long[] ids) {
        return factoryManagementMapper.deleteFactoryManagementByIds(ids);
    }

    /**
     * 删除工厂管理信息
     *
     * @param id 工厂管理主键
     * @return 结果
     */
    @Override
    public int deleteFactoryManagementById(Long id) {
        return factoryManagementMapper.deleteFactoryManagementById(id);
    }
}
